// https://nuxt.com/docs/api/configuration/nuxt-config

export default defineNuxtConfig({
    compatibilityDate: '2024-11-01',
    modules: [
        '@pinia/nuxt',
        'pinia-plugin-persistedstate/nuxt',
        '@vant/nuxt',
    ],
    nitro:{
        compressPublicAssets:true,
        prerender: {
            crawlLinks: true,
            failOnError: false,
        }
    },
    // routeRules: {
    //     "/**": { swr: true },
    // },
    vant: {},
    runtimeConfig: {
        public: {
            baseURL: 'http://localhost',
            webSocketURL: 'ws://localhost',
            // TODO 填写ak
            ak:'yourak',

            //是否开启图片url替换，主要是用户头像
            // enableReplaceImgURL:true,
            enableReplaceImgURL:false,
            oldImgHost:'http://centos7:9000',
            newImgHost:'https://xxxx:22312',
            defaultUserAvatarURL:'https://tse1-mm.cn.bing.net/th/id/OIP-C.RFgnRHK1YvW7-fUS-v8L1AAAAA?w=176&h=176&c=7&r=0&o=5&dpr=1.4&pid=1.7'
        }
    },
    devServer:{
        host:'127.0.0.1',
        port:3000
    },
    imports: {
        dirs: [
            'store/**.ts',
            'composables/**',
            'pojo/**',
            'components/**',
        ]
    },
    devtools: {enabled: false},
})
